package com.example.pointerdemo

import android.util.Log
import android.view.View
import android.view.accessibility.AccessibilityEvent

/**
 * @Author xiao
 * @Date 2021/6/18
 * @Description
 */
class TrackingAccessibilityDelegate : View.AccessibilityDelegate() {

    override fun sendAccessibilityEvent(host: View?, eventType: Int) {
        super.sendAccessibilityEvent(host, eventType)
        if (host != null && eventType == AccessibilityEvent.TYPE_VIEW_CLICKED) {
            Log.e("Tracking", host::class.java.name)
        }
    }
}